﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admins/AdminMaster.Master" AutoEventWireup="true"
    CodeFile="Category.aspx.cs" Inherits="admins_Category" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            height: 27px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="PageName">
        Quản trị Địa điểm du lịch</div>
    <asp:Label ID="lb_messenger" runat="server"></asp:Label>
    <asp:Panel ID="pnView" runat="server">
        <%-- <div id="search_block"> Tên nhóm sản phẩm:
    <asp:DropDownList ID="drop_danh_muc_san_pham" runat="server" CssClass="active" AutoPostBack=true></asp:DropDownList>
    Trạng thái:
    <asp:DropDownList ID="ddlFilterActive" runat="server" CssClass="active"></asp:DropDownList>
    <asp:DropDownList ID="drlNhomtrangchu" runat="server" CssClass="active" 
        Visible="False"></asp:DropDownList>
    Nhóm ưu tiên:
    <asp:DropDownList ID="drlNhomuutien" runat="server" CssClass="active"></asp:DropDownList>
    <asp:Button ID="Filter" runat="server" onclick="Filter_Click" Text="Lọc" CssClass="filter" />
    <asp:Button ID="UnFilter" runat="server" onclick="UnFilter_Click" Text="Bỏ lọc" />
  </div>--%>
        <div class="Control">
            <ul>
                <li>
                    <asp:LinkButton CssClass="vadd" ID="lbtAddT" runat="server" OnClick="AddButton_Click">Thêm mới</asp:LinkButton>
                </li>
                <li>
                    <asp:LinkButton CssClass="vdelete" ID="lbtDeleteT" runat="server" OnClientClick="javascript:return confirm('Bạn có muốn xóa?');" OnClick="DeleteButton_Click">Xóa</asp:LinkButton>
                </li>
                <li>
                    <asp:LinkButton CssClass="uupdate" ID="lbtUpdateOrd" runat="server" OnClick="lbtUpdateOrd_Click">Cập nhật thứ tự</asp:LinkButton>
                </li>
                <li>
                    <asp:LinkButton CssClass="vrefresh" ID="lbtRefreshT" runat="server" OnClick="RefreshButton_Click">Làm mới</asp:LinkButton>
                </li>
                <li><a class="vback" href="javascript:void(0);" onclick="window.history.go(-1);">Trở
                    lại</a> </li>
            </ul>
        </div>
        <asp:DataGrid ID="grid_loai_san_pham" runat="server" Width="100%" CssClass="TableView"
            AutoGenerateColumns="False" AllowPaging="True" PagerStyle-Mode="NumericPages"
            PagerStyle-HorizontalAlign="Center" OnItemDataBound="grdCategory_ItemDataBound"
            OnItemCommand="grdCategory_ItemCommand" OnPageIndexChanged="grdCategory_PageIndexChanged"
            AllowSorting="True" PageSize="20">
            <HeaderStyle CssClass="trHeader"></HeaderStyle>
            <ItemStyle CssClass="trOdd"></ItemStyle>
            <AlternatingItemStyle CssClass="trEven"></AlternatingItemStyle>
            <Columns>
                <asp:TemplateColumn ItemStyle-CssClass="tdCenter">
                    <HeaderTemplate>
                        <asp:CheckBox ID="chsetAll" onClick="check_all(this);" runat="server" AutoPostBack="False">
                        </asp:CheckBox>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="chkSelect" runat="server"></asp:CheckBox>
                    </ItemTemplate>
                    <ItemStyle CssClass="tdCenter"></ItemStyle>
                </asp:TemplateColumn>
                <asp:BoundColumn DataField="loai_tour_id" HeaderText="Id" Visible="False" />
                <asp:BoundColumn DataField="trang_thai" HeaderText="Active" Visible="False" />
                
                <asp:TemplateColumn ItemStyle-CssClass="Text">
                    <HeaderTemplate>
                        Tên địa điểm
                        <asp:LinkButton CssClass="sortasc" ID="lbtascname" CommandName="ascname" runat="server"
                            ToolTip="Sắp xếp theo tên tăng dần">s</asp:LinkButton>
                        <asp:LinkButton CssClass="sortdesc" ID="lbtdescname" CommandName="descname" runat="server"
                            ToolTip="Sắp xếp theo tên giảm dần">s</asp:LinkButton>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("ten_loai_tour") %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle CssClass="Text" />
                </asp:TemplateColumn>
               <%-- <asp:TemplateColumn ItemStyle-CssClass="Image">
                    <HeaderTemplate>
                        Hình ảnh</HeaderTemplate>
                    <ItemTemplate>
                        <script type="text/javascript">                            playfile('<% %>', "95", "80", "false", "", "", "")</script>
                    </ItemTemplate>
                    <ItemStyle CssClass="Image" />
                </asp:TemplateColumn>--%>
                <%--<asp:TemplateColumn ItemStyle-CssClass="Activehead">
      <HeaderTemplate>Kích hoạt
        <asp:LinkButton CssClass="sortasc" ID="lbtascactive" CommandName="ascactive" runat="server" ToolTip="Sắp xếp theo kích hoạt tăng dần">s</asp:LinkButton>
        <asp:LinkButton CssClass="sortdesc" ID="lbtdescactive" CommandName="descactive" runat="server" ToolTip="Sắp xếp theo kích hoạt giảm dần">s</asp:LinkButton>
      </HeaderTemplate>
      <ItemTemplate>
        <asp:label id="lblStatus" style="padding-left: 10px" runat="server" Text='<%# Eval("trang_thai")%>'></asp:label>
      </ItemTemplate>
      <ItemStyle CssClass="Activehead" />
    </asp:TemplateColumn>--%>
                <asp:TemplateColumn ItemStyle-CssClass="Activehead">
                    <HeaderTemplate>
                        Thứ tự
                        <asp:LinkButton CssClass="sortasc" ID="lbtascord" CommandName="ascord" runat="server"
                            ToolTip="Sắp xếp theo thứ tự tăng dần">s</asp:LinkButton>
                        <asp:LinkButton CssClass="sortdesc" ID="lbtdescord" CommandName="descord" runat="server"
                            ToolTip="Sắp xếp theo thứ tự giảm dần">s</asp:LinkButton>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:TextBox ID="txtOrd" runat="server" Text='<%# Eval("vi_tri")%>' CssClass="text number"
                            Width="80px" Style="text-align: center"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvOrdview" runat="server" ControlToValidate="txtOrd"
                            Display="Dynamic" ErrorMessage="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
                    </ItemTemplate>
                    <ItemStyle CssClass="Activehead" />
                </asp:TemplateColumn>
                <asp:TemplateColumn ItemStyle-CssClass="Function">
                    <HeaderTemplate>
                        Chức năng</HeaderTemplate>
                    <ItemTemplate>
                        <%--<asp:ImageButton ID="ImageButton1" runat="server" AlternateText="Thêm nhóm con" CommandName="AddSub" CssClass="Add" ToolTip="Thêm nhóm con" ImageUrl="/App_Themes/Admin/images/add.png" CommandArgument='<%%>' />--%>
                        <asp:ImageButton ID="cmdEdit" runat="server" AlternateText="Sửa" CommandName="Edit"
                            CssClass="Edit" ToolTip="Sửa" ImageUrl="/App_Themes/Admin/images/edit.png" CommandArgument='<%# Eval("loai_tour_id")%>' />
                        <asp:ImageButton ID="cmdDelete" runat="server" AlternateText="Xóa" CommandName="Delete"
                            CssClass="Delete" ToolTip="Xóa" ImageUrl="/App_Themes/Admin/images/delete.png"
                            CommandArgument='<%# Eval("loai_tour_id")%>' OnClientClick="javascript:return confirm('Bạn có muốn xóa?');" />
                        <%--<asp:ImageButton ID="cmdActive" runat="server" AlternateText='<%%>' CommandName="Active" CssClass="Active"  ImageUrl='<%# "/App_Themes/Admin/images/"+ Eval("ngay_sua")%>' CommandArgument='<%# Eval("loai_san_pham_id")%>' />--%>
                    </ItemTemplate>
                    <ItemStyle CssClass="Function" />
                </asp:TemplateColumn>
            </Columns>
            <PagerStyle HorizontalAlign="Center" CssClass="Paging" NextPageText="Previous" PrevPageText="Next">
            </PagerStyle>
        </asp:DataGrid>
        <div class="Control">
            <ul>
                <li>
                    <asp:LinkButton CssClass="vadd" ID="lbtAddB" runat="server" OnClick="AddButton_Click">Thêm mới</asp:LinkButton>
                </li>
                <li>
                    <asp:LinkButton CssClass="vdelete" ID="lbtDeleteB" runat="server" OnClientClick="javascript:return confirm('Bạn có muốn xóa?');" OnClick="DeleteButton_Click">Xóa</asp:LinkButton>
                </li>
                <li>
                    <asp:LinkButton CssClass="uupdate" ID="lbtUpdateOrdBottom" runat="server" OnClick="lbtUpdateOrdBottom_Click">Cập nhật thứ tự</asp:LinkButton>
                </li>
                <li>
                    <asp:LinkButton CssClass="vrefresh" ID="lbtRefreshB" runat="server" OnClick="RefreshButton_Click">Làm mới</asp:LinkButton>
                </li>
                <li><a class="vback" href="javascript:void(0);" onclick="window.history.go(-1);">Trở
                    lại</a> </li>
            </ul>
        </div>
    </asp:Panel>
    <asp:Panel ID="pnUpdate" runat="server" Visible="false">
        <table class="TableUpdate" border="1">
            <tr>
                <td class="Control" colspan="2">
                    <ul>
                        <li>
                            <asp:LinkButton CssClass="uupdate" ID="lbtUpdateT" runat="server" OnClick="Update_Click">Ghi lại</asp:LinkButton>
                        </li>
                        <li>
                            <asp:LinkButton CssClass="uback" ID="lbtBackT" runat="server" OnClick="Back_Click"
                                CausesValidation="False">Trở về</asp:LinkButton>
                        </li>
                    </ul>
                </td>
            </tr>
            <tr>
                <td>Địa điểm cha</td>
                <td><asp:DropDownList ID="drop_loai_san_pham" runat=server></asp:DropDownList></td>
            </tr>
            <tr>
                <th>
                    <asp:Label ID="lblName" runat="server" Text="Tên địa điểm:"></asp:Label>
                </th>
                <td>
                    <asp:TextBox ID="txt_ten_loai_san_pham" runat="server" CssClass="text"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvName" runat="server" ControlToValidate="txt_ten_loai_san_pham"
                        Display="Dynamic" ErrorMessage="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
                    <asp:HiddenField ID="txtId" runat="server" />
                </td>
            </tr>
            <tr>
                <th>
                    <asp:Label ID="Label2" runat="server" Text="Hiện danh mục:"></asp:Label>
                </th>
                <td>
                    <asp:CheckBox ID="ck_hien_danh_muc" runat="server" />
                </td>
            </tr>
            <tr>
                <th>
                    <asp:Label ID="lblOrd" runat="server" Text="Thứ tự:"></asp:Label>
                </th>
                <td>
                    <asp:TextBox ID="txt_thu_tu" runat="server" Text="1" DataType="integer" CssClass="text number" />
                    <asp:RequiredFieldValidator ID="rfvOrd" runat="server" ControlToValidate="txt_thu_tu"
                        Display="Dynamic" ErrorMessage="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="Control" colspan="2">
                    <ul>
                        <li>
                            <asp:LinkButton CssClass="uupdate" ID="lbtUpdateB" runat="server" OnClick="Update_Click">Ghi lại</asp:LinkButton>
                        </li>
                        <li>
                            <asp:LinkButton CssClass="uback" ID="lbtBackB" runat="server" OnClick="Back_Click"
                                CausesValidation="False">Trở về</asp:LinkButton>
                        </li>
                    </ul>
                </td>
            </tr>
        </table>
    </asp:Panel>

</asp:Content>
